package edu.gxmzu.task.service;

import edu.gxmzu.task.entity.TaskDistributeEntity;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * author: lrf
 * time: 2024-11-29
 * version : V1
 */
public interface TaskDisposeService {

    /**
     * 获取下发人员接口
     * @return
     */
    List<Map<String, Object>> getUserName(String name);

    /**
     * 任务派发
     * @return
     */
    int taskDistribute(TaskDistributeEntity distribute);

    /**
     * 附件上传
     * @return
     */
    Map<String, Object> uploadFile(MultipartFile file) throws IOException;


    String uploadFile1(MultipartFile file) throws IOException;

    /**
     * 获取附件上传ID (废弃)
     * @return
     */
    String getAttachmentsId();

    /**
     * 本周完成的任务
     * @return
     */
    Map<String, Integer> countTaskNum(Long createTime, Long endTime, String title);

    /**
     * 已办代办任务情况
     * @return
     */
    Map<String, Object> countWorkStatus(Long createTime, Long endTime, String title);

    /**
     * 全部任务
     * @return
     */
    int tasksList(String userid);

    /**
     * 到期任务
     * @return
     */
    int tasksGuoQiList(@Param("userid")String userid, @Param("nweDate")Long newDate);

    /**
     * 文件下载
     *
     * @return
     */
    Object download(String name, HttpServletResponse response);


}
